VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "tbMenuItem"
Attribute VB_Creatable = True
Attribute VB_Exposed = False
Option Explicit

Public VBInstance As Object
Public Operation As Integer

Public Sub AfterClick()
'___process menu line click events
Dim i%, j%
Dim MyProperty As Object
Dim testControl As Object
'___make sure form doesn't have unsaved changes
'If Not CheckForDirt() Then
    Select Case Operation
    Case opLoad
        Load tbLoadForm
    Case opSave
        Load tbSaveForm
    End Select
'End If
End Sub

Public Function CheckForDirt() As Boolean
'___warn user if form need to be saved
Dim CurrFormName$, i%
With gobjIDEAppInst.ActiveProject
    CurrFormName$ = .ActiveForm.Properties.Item("Name")
    With .Components
        For i% = 0 To .Count - 1
            If .Item(i%).Name = CurrFormName$ Then
                If .Item(i%).IsDirty Then
                                        
                    CheckForDirt = True
                    Beep
'                    Alert "Please save " & CurrFormName$ & " before attempting to load or save a toolbar."
'                    Load SavePrmpt
                    SavePrmpt.Label1.Caption = "Please save " & CurrFormName$ & " before attempting to load or save a toolbar."
                    SavePrompt.Show 1
                  Exit Function
                End If
            End If
        Next
    End With
End With
End Function

Private Sub Class_Initialize()

End Sub


